<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateOrdersTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('orders', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(null)->nullable();
            $table->integer('customer_id')->default(null)->nullable();
            $table->decimal('price', 10, 2)->default(0)->comment("价格");
            $table->integer('number')->default(null)->nullable()->comment("数量");
            $table->integer('type')->default(1)->nullable()->comment("类型");
            $table->integer('status')->default(1)->nullable()->comment("状态");
            $table->text('remark')->nullable()->comment("备注");
            $table->string('sn', 191)->nullable()->comment("单据号");
            $table->string('province', 191)->nullable()->comment("省");
            $table->string('created_date', 191)->nullable()->comment("添加日期");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('orders');
    }
}
